package ua.kiev.tosik.price.gui;

import javax.swing.*;

/**
 * This worker create gui components: status bar, menu
 */
public class CreateGuiComponentsWorker extends SwingWorker<Void, Void> {

	public CreateGuiComponentsWorker() {
		super();
	}

	@Override
	protected Void doInBackground() throws Exception {
		firePropertyChange("Message", null, "Creating menu..");
		firePropertyChange("CreateMenu", null, "Creating menu..");
		firePropertyChange("Message", null, "Creating status bar..");
		firePropertyChange("CreateStatus", null, "CreateStatus");
		firePropertyChange("Message", null, "Creating task panel..");
		firePropertyChange("CreateStatus", null, "CreateTaskPanel");
		firePropertyChange("Message", null, "Creating tab panel..");
		firePropertyChange("CreateStatus", null, "CreateTabPanel");
		return null;
	}

	@Override
	protected void done() {
		super.done();
		firePropertyChange("Message", null, "Done");
		firePropertyChange("RunMainWindow", null, true);
	}

}
